import { Responses } from '../../../../../resources/responses';
import ZoneId from '../../../../../resources/zone_id';
import { RaidbossData } from '../../../../../types/data';
import { TriggerSet } from '../../../../../types/trigger';

export type Data = RaidbossData;

const triggerSet: TriggerSet<Data> = {
  id: 'MalikahsWell',
  zoneId: ZoneId.MalikahsWell,
  timelineFile: 'malikahs_well.txt',
  triggers: [
    {
      id: 'Malikah Stone Flail',
      type: 'StartsUsing',
      netRegex: { id: '3CE5', source: 'Greater Armadillo' },
      response: Responses.tankBuster(),
    },
    {
      id: 'Malikah Head Toss Stack',
      type: 'HeadMarker',
      netRegex: { id: '003E' },
      response: Responses.stackMarkerOn(),
    },
    {
      id: 'Malikah Right Round',
      type: 'StartsUsing',
      netRegex: { id: '3CE7', source: 'Greater Armadillo', capture: false },
      infoText: (_data, _matches, output) => output.text!(),
      outputStrings: {
        text: {
          en: 'Melee Knockback',
          de: 'Nahkämpfer Rückstoß',
          fr: 'Poussée au CaC',
          ja: '近接最大距離ノックバック',
          cn: '近战击退',
          ko: '근거리 넉백',
        },
      },
    },
    {
      id: 'Malikah Deep Draught',
      type: 'StartsUsing',
      netRegex: { id: '4188', source: 'Pack Armadillo' },
      condition: (data) => data.CanSilence(),
      response: Responses.interrupt('info'),
    },
    {
      id: 'Malikah Efface',
      type: 'StartsUsing',
      netRegex: { id: '3CEB', source: 'Amphibious Talos' },
      response: Responses.tankBuster(),
    },
    {
      id: 'Malikah High Pressure',
      type: 'StartsUsing',
      netRegex: { id: '3CEC', source: 'Amphibious Talos', capture: false },
      response: Responses.knockback('info'),
    },
    {
      id: 'Malikah Swift Spill',
      type: 'StartsUsing',
      netRegex: { id: '3CEF', source: 'Amphibious Talos', capture: false },
      response: Responses.getBehind('info'),
    },
    {
      id: 'Malikah Intestinal Crank',
      type: 'StartsUsing',
      netRegex: { id: '3CF1', source: 'Storge', capture: false },
      response: Responses.aoe(),
    },
  ],
  timelineReplace: [
    {
      'locale': 'de',
      'replaceSync': {
        'Pack Armadillo': 'Rudel-Gürteltier',
        'Terminus': 'Drehscheibe',
        'Malikah\'s Gift': 'Malikahs Quelle',
        'Unquestioned Acceptance': 'Residenz der Großherzigkeit',
        'Greater Armadillo': 'Riesengürteltier',
        'Amphibious Talos': 'Wasserträger-Talos',
        'Storge': 'Storge',
        'Rhapsodic Nail': 'Keil der Liebe',
      },
      'replaceText': {
        'Pack Armadillo': 'Rudel-Gürteltier',
        'Stone Flail': 'Steindresche',
        'Head Toss': 'Kopfwurf',
        'Right Round': 'Rotation',
        'Flail Smash': 'Dresche',
        'Earthshake': 'Bodenbeber',
        'Efface': 'Zerstören',
        'Wellbore': 'Kübelwirbel',
        'Geyser Eruption': 'Geysir',
        'High Pressure': 'Überdruck',
        'Swift Spill': 'Schneller Abfluss',
        'Intestinal Crank': 'Geweiderupfer',
        'Heretic\'s Fork': 'Blutadler',
        'Breaking Wheel': 'Radbruch',
        'Crystal Nail': 'Kristallnagel',
        'Censure': 'Tadel',
        '(?!<Pack )Armadillo': 'Armadillo',
      },
    },
    {
      'locale': 'fr',
      'replaceSync': {
        'Pack Armadillo': 'Tatou Grégaire',
        'Amphibious Talos': 'Talos Amphibie',
        'Greater Armadillo': 'Grand Tatou',
        'Malikah\'s Gift': 'le Source de Malikah',
        'Rhapsodic Nail': 'Pieu Rhapsodique',
        'Storge': 'Storgê',
        'Terminus': 'cimetière de chariots',
        'Unquestioned Acceptance': 'l\'aven oublié',
      },
      'replaceText': {
        '\\?': ' ?',
        'Breaking Wheel': 'Roue de la torture',
        'Censure': 'Blâme',
        'Crystal Nail': 'Clou de cristal',
        'Earthshake': 'Vacillation',
        'Efface': 'Désintégration',
        'Flail Smash': 'Fléau fracassant',
        'Geyser Eruption': 'Geyser aqueux',
        'Head Toss': 'Tournis',
        'Heretic\'s Fork': 'Fourche de l\'hérétique',
        'High Pressure': 'Haute pression',
        'Intestinal Crank': 'Manivelle intestinale',
        'Pack Armadillo': 'Tatou grégaire',
        'Right Round': 'Grande culbute',
        'Stone Flail': 'Fléau rocheux',
        'Swift Spill': 'Déversement',
        'Wellbore': 'Forage profond',
      },
    },
    {
      'locale': 'ja',
      'replaceSync': {
        'Pack Armadillo': 'パック・アルマジロ',
        'Amphibious Talos': 'ハイドロタロース',
        'Greater Armadillo': 'グレーター・アルマジロ',
        'Malikah\'s Gift': 'マリカの水源',
        'Rhapsodic Nail': '愛の楔',
        'Storge': 'ストルゲー',
        'Terminus': 'トロッコターミナル',
        'Unquestioned Acceptance': '無償の離宮',
      },
      'replaceText': {
        '\\?': ' ?',
        'Breaking Wheel': 'ブレイキングホイール',
        'Censure': '執行',
        'Crystal Nail': '杭打ち',
        'Earthshake': '地盤振動',
        'Efface': 'デストロイ',
        'Flail Smash': 'フレイルスマッシュ',
        'Geyser Eruption': 'ガイザー',
        'Head Toss': 'ヘッドトス',
        'Heretic\'s Fork': 'ヘレティックフォーク',
        'High Pressure': 'ハイプレッシャー',
        'Intestinal Crank': 'インテスティナルクランク',
        'Pack Armadillo': 'パック・アルマジロ',
        'Right Round': '大回転',
        'Stone Flail': 'ロックフレイル',
        'Swift Spill': '強制放水',
        'Wellbore': 'ウェルボーラー',
      },
    },
    {
      'locale': 'cn',
      'replaceSync': {
        'Pack Armadillo': '群落犰狳',
        'Terminus': '轨道车站',
        'Malikah\'s Gift': '马利卡水源',
        'Unquestioned Acceptance': '无偿离宫',
        'Greater Armadillo': '大犰狳',
        'Amphibious Talos': '水陆两用塔罗斯',
        'Storge': '斯托尔戈',
        'Rhapsodic Nail': '爱之桩柱',
      },
      'replaceText': {
        'Stone Flail': '落石重锤',
        'Head Toss': '甩尾锤',
        'Right Round': '大回旋',
        'Flail Smash': '重锤碎击',
        'Earthshake': '地盘震动',
        'Efface': '抹灭',
        'Wellbore': '钻井',
        'Geyser Eruption': '井水喷出',
        'High Pressure': '高压',
        'Swift Spill': '强制放水',
        'Intestinal Crank': '绞肠',
        'Heretic\'s Fork': '异端十字叉',
        'Breaking Wheel': '碎轮',
        'Crystal Nail': '打桩',
        'Censure': '执行',
        'Armadillo': '犰狳',
        'Pack': '',
      },
    },
    {
      'locale': 'ko',
      'replaceSync': {
        'Pack Armadillo': '무리 아르마딜로',
        'Terminus': '광차 종점',
        'Malikah\'s Gift': '말리카의 수원',
        'Unquestioned Acceptance': '시민 별장',
        'Greater Armadillo': '거대 아르마딜로',
        'Amphibious Talos': '수력 탈로스',
        'Storge': '스토르게',
        'Rhapsodic Nail': '사랑의 말뚝',
      },
      'replaceText': {
        'Stone Flail': '바위 타작',
        'Head Toss': '머리 겨냥',
        'Right Round': '대회전',
        'Flail Smash': '타작 충돌',
        'Earthshake': '지반 진동',
        'Efface': '파괴',
        'Wellbore': '우물 파기',
        'Geyser Eruption': '간헐천',
        'High Pressure': '고압',
        'Swift Spill': '강제 급수',
        'Intestinal Crank': '창자 비틀기',
        'Heretic\'s Fork': '이단자의 창',
        'Breaking Wheel': '파괴의 바퀴',
        'Crystal Nail': '말뚝박기',
        'Censure': '집행',
        '2x Pack Armadillo': '쫄 2마리 소환',
      },
    },
  ],
};

export default triggerSet;
